package com.jyy.prefabricated.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jyy.prefabricated.common.AjaxResult;
import com.jyy.prefabricated.dto.StudentAchievementDto;
import com.jyy.prefabricated.entity.EligibilityRules;
import com.jyy.prefabricated.entity.StudentAchievement;
import com.jyy.prefabricated.entity.SysUser;
import com.jyy.prefabricated.enums.UserTypeEnum;
import com.jyy.prefabricated.service.EligibilityRulesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 考试合格规则表(EligibilityRules)表控制层
 *
 * @author mrl
 * @since 2021-07-07 16:19:03
 */

@Slf4j
@RequestMapping("/api")
@RestController
public class EligibilityRulesController {
    /**
     * 服务对象
     */
    @Resource
    private EligibilityRulesService eligibilityRulesService;

    /**
     * 查询考试规则
     *
     * @param eligibilityRules 查询条件
     * @return 考试合格规则
     */
    @GetMapping("/eligibilityRules")
    public AjaxResult selectEligibilityRules(EligibilityRules eligibilityRules){
        List<EligibilityRules> eligibilityRulesList = eligibilityRulesService.queryAll(eligibilityRules);
        return AjaxResult.success(eligibilityRulesList);
    }
}